The present invention relates to a communication apparatus, a transmission apparatus and a reception apparatus. More particularly, the present invention relates to a communication apparatus, a transmission apparatus and a reception apparatus, which are used for transmitting and receiving streaming data to and from a network.
In the past, some transmission protocols were proposed suitable for transferring video data including moving-picture data, audio data and auxiliary data to a destination by way of a network and streaming to reproduce the data in a real-time manner. The RFC 1889 has recommended an RTP (Real-time Transport Protocol), which is one of the proposed transmission protocols, as a transport protocol for realizing a real-time transport application for transmitting/receiving sounds and moving pictures in a real-time manner by way of an IP network such as the Internet.
In general, the RTP is adopted in conjunction with an RTCP (Real-time Transport Control Protocol) for controlling the RTP on a UDP (User Datagram Protocol), which is a connectionless protocol. While the RTP is a protocol for transmitting sound and moving-picture data, the RTCP is a protocol for implementing a function to check information such as a transmission delay and line quality as well as a function to notify an application adopting the RTP of the information. For example, an RTCP packet transmitted by a sender transferring RTP data includes an SR (Sender Report) including a timestamp and the number of transmitted RTP packets and an RR (Receiver Report). On the other hand, an RTCP packet transmitted by a receiver of RTP data includes an RR including an RTP loss factor, the number of lost RTP packets and an average value of jitters of arrival-time gaps. For this reason, it is necessary for the transmitter of RTP data to manage sender information and receiver information. The sender information includes the number of RTP packets transmitted in the transmission of the RTP data. On the other hand, the receiver information includes the number of RTP packets lost in the reception of the RTP data.
Since it is necessary to manage these pieces of information, traditionally, RTP/RTCP communications are implemented by carrying out software processing by using a process in a host such as a personal computer.
In addition, in order to process data at an even higher speed, processing to packetize and depacketize data by RTP is carried out by using an external apparatus instead of executing a process in the host. An example of such an external apparatus is data communication hardware connected to a PCI bus. For details, refer to patent reference 1 or other documents.
FIG. 24 is a diagram showing the configuration of the conventional communication apparatus. The communication apparatus shown in the figure is explained as an apparatus on the transmission side. In the conventional communication apparatus, data generated by an encoder 310 is packetized by an RTP process unit 500, and a network device 330 transmits the packet to an apparatus on the reception side. The processing function of the RTP process unit 500 is implemented by software. To be more specific, a control unit such as a CPU executes a program of the software. In order to transmit an RTP packet to an apparatus on the reception side, sender information is recorded in an RTP information management database 501 in advance. As a time to transmit the RTCP packet to an apparatus on the reception side is reached, the RTCP packet is generated on the basis of the sender information, and the network device 330 transmits the RTCP packet.
A communication apparatus disclosed in patent reference 1 is further connected to an RTP card 610, which carries out transmissions and receptions of RTP packets by using hardware. The RTP process unit 500 forms a judgment as to whether the RTP process unit 500 or the RTP card 610 is to transmit an RTP packet to an apparatus on the reception side. If the RTP process unit 500 is determined to be the unit to transmit an RTP packet, the procedure described above is followed. If the RTP card 610 is determined to be the unit to transmit an RTP packet, on the other hand, the RTP packet is transmitted by updating an RTP information management database 611 of the RTP card 610 in advance. As a time to transmit the RTCP packet to an apparatus on the reception side is reached, the contents of the RTP information management database 611 are copied to the RTP information management database 501 of the host and the RTCP packet is generated on the basis of information acquired from the RTP information management database 501. Then, the RTP card 610 transmits the RTCP packet to an apparatus on the reception side. In processing to receive an RTCP packet, data is extracted from the RTCP packet along a route opposite to the transmission process described above.
Next, the RTP process unit 500 is explained in detail. FIG. 25 is a diagram showing the configuration of the RTP process unit 500 employed in the conventional communication apparatus.
In this case, in accordance with the RFC 2250, an RTP packet having an MPEG-2 transport stream (referred to hereafter simply as an MPEG2-TS) as a payload is required to include an RTP timestamp field in the RTP header having a value synchronized to the data stored in a PCR (Program Clock Reference) field of a TS packet, which is enclosed in the RTP packet as a portion of the RTP payload.
In the RTP process unit 500, when a TS packet generated by an MPEG-2 encoder 311 is supplied to an encoder interface (I/F) 312, the TS packet is passed on to a TS header checker 502, which checks the header of the TS packet to detect a PCR field. The TS header checker 502 stores the detected PCR field in PCR registers 504 and temporarily stores the TS packet in a TS buffer 505. A packet transmission control unit 503 manages information such as the number of input TS packets. As conditions for a packet transmission are all satisfied, the packet transmission control unit 503 issues a request for a transmission of an RTP packet to a packet synthesis unit 506. At this request, the packet synthesis unit 506 generates a timestamp from the value of the PCR field stored in the PCR registers 504. The packet synthesis unit 506 also generates the RTP packet including an RTP payload and an RTP header. The RTP payload includes the TS packets stored in the TS buffer 505 and the RTP header includes the generated timestamp in the RTP timestamp field of the RTP header.
Patent reference 1: Japanese Patent Laid-open No. 2001-320407
However, the conventional communication apparatus has a problem in that it is difficult to maintain a streaming quality for some states of the conventional communication apparatus serving as a host. In addition, the conventional communication apparatus has another problem in that it is hard to make the scale of the circuit compact in order to maintain a predetermined streaming quality.
As shown in FIG. 24, in the conventional communication apparatus, a control unit in the communication apparatus serving as a host carries out the processing to packetize and depacketize data in and from an RTCP/RTP packet by execution of software. Even if the RTP card 610 for carrying out the RTP processing is employed as an additional unit, the control unit in the host forms a judgment as to whether the RTP processing is to be carried out by using the software or the hardware.
For the reason described above, in dependence on the processing state of the host or the condition of the network, it may be impossible to assure sufficient precision for a measured packet arrival time or for a determined timing to pass real-time data to a protocol at a higher level. In general, in measuring time by using software, the arrival of a packet interrupts the host, which then carries out an interrupt-handling process to measure a time. However, an interrupt latency (defined as a period of time between the generation of an interrupt signal and the implementation of the interrupt-handling process) of the host varies in dependence on the processing state of the host. In a reception process, the arrival time of a packet must be measured at the precision of an RTP timestamp. By the same token, the timing to pass real-time data to a protocol at a higher level must be determined also at the precision of an RTP timestamp. In the case of an MPEG2-TS serving as an object of processing, a resolution of 90 KHz (or about 11.11 microseconds) is required. Thus, if the reception process is entirely carried out by using software, in some cases, sufficient precision cannot be assured because of reasons such as the fact that the measured time and the determined timing lag behind their respective correct values.
If the measured arrival time has a lack of precision, it is impossible to estimate a QoS (Quality of Service) on the network with a high degree of accuracy. Thus, information cannot be reported correctly. As a result, the condition of the network cannot be improved on the basis of the incorrectly reported information.
In addition, a communication apparatus on the reception side controls a timing to pass data extracted from an RTP packet to a protocol at a higher level by referring to an RTP timestamp set by the communication apparatus on the transmission side in the header of the RTP packet. To put it in detail, the data is temporarily stored in the buffer and then passed to a protocol at a higher level as soon as the time obtained as a result of adding jitters to an RTP timestamp of the RTP packet is reached. For this reason, it is necessary to synchronize a timer employed in the communication apparatus on the transmission side to a timer employed in the communication apparatus on the reception side. As described above, however, it is impossible to assure sufficient precision for timings determined by the communication apparatus on the transmission and reception sides. Thus, a problem is raised in that it is difficult to synchronize the timer employed in the communication apparatus on the transmission side to the timer employed in the communication apparatus on the reception side. Assume for example that the timer employed in the communication apparatus on the transmission side is proceeding in a manner lagging behind the timer employed in the communication apparatus on the reception side. In this case, the speed to pass data extracted from RTP packets to a protocol at a higher level is low with respect to the speed at which the RTP packets are received. As a result, an overflow occurs in a buffer for temporarily storing the data.
Thus, if the measured arrival time has a lack of precision or if the timer for setting an RTP timestamp in the communication apparatus on the transmission side is not synchronized to the timer for interpreting the same RTP timestamp in the communication apparatus on the reception side as described above, it is impossible to set the timing to pass data to a protocol at a higher level with a high degree of accuracy. Assume for example that the protocol at the higher level is a decoder. In this case, a reproduction timing of the decoder will be greatly affected by the timing to pass data from the RTP process unit 500 to the decoder unless a buffer employed in the decoder has a sufficiently large size. The quality of the reproduction result of the stream data will be greatly affected as well. In order to solve this problem, it is necessary to provide a margin to the size of the buffer employed in the decoder. In this case, however, the circuit will be inevitably designed in a wasteful manner.
On the other hand, in order to synchronize the RTP timestamp to the value stored in the PCR field of a TS packet received from a protocol at the higher level in the apparatus on the transmission side, the TS packet is stored in the TS buffer 505 and the value stored in the PCR field is managed by using the PCR registers 504. Therefore, the number of TS packets managed in the TS buffer 505 is limited to the number of PCR registers employed in the PCR registers 504. Since a ratio of the number of TS packets each including a PCR field to the amount of data passed by the protocol at the higher level is dependent on the condition of the protocol at the higher level, it is difficult to estimate the ratio at the design stage. It is therefore necessary to provide a margin to the design of the PCR registers 504 and the TS buffer 505. In consequence, the circuit will be unavoidably designed in a wasteful manner.